var Dog = require("./dog.js");

//实例化Dog函数
var dog = new Dog("taidi", 8);

//监听
dog.on("bark", function(){
    console.log(this.name + " barked, energy left " + this.energy);
})

